package cc.rengu.redp.bizimpl.upmp.dao;

import cc.rengu.redp.bizimpl.upmp.domain.UpmpUserInfo;
import cc.rengu.redp.bizimpl.upmp.vo.UpmpUserInfoVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author System
 */

@Repository
public interface UpmpUserInfoMapper extends BaseMapper<UpmpUserInfo> {


    IPage<UpmpUserInfo> findPageList(Page page, @Param("upmpUserInfoVO") UpmpUserInfoVO upmpUserInfoVO);
    /**
     * 查詢内管用户
     * @param instId
     * @param loginId
     * @return
     */
    List<UpmpUserInfo> findUpmpUserInfo(@Param("instId") String instId, @Param("loginId") String loginId, @Param("userStatus") String userStatus);
    /**
     * 查詢内管用户
     * @param userType
     * @param loginId
     * @return
     */
    UpmpUserInfo findByLoginId(String userType, String loginId);

    /**
     * 查詢商户服务用户
     * @param instId
     * @param loginId
     * @return
     */
    List<UpmpUserInfo> findBspsUserInfo(String instId, String loginId);

    /**
     * 查詢第三方应用用户
     * @param instId
     * @param loginId
     * @return
     */
    List<UpmpUserInfo> findThirdUserInfo(String instId, String loginId);

    /**
     * 机构撤并列表查询
     * @param signinstid
     * @param instId
     * @return
     */
    List<UpmpUserInfo> getUserBySignInstId(String signinstid, String instId);

    /**
     * 机构撤并撤并操作
     * @param newsigninstid
     * @param id
     * @return
     */
    Integer updateUser(String newsigninstid,String id);
}
